/*
 * Copyright (C) 2019 The Turms Project
 * https://github.com/turms-im/turms
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: request/storage/delete_resource_request.proto

package im.turms.client.model.proto.request.storage;

/**
 * Protobuf type {@code im.turms.proto.DeleteResourceRequest}
 */
public  final class DeleteResourceRequest extends
    com.google.protobuf.GeneratedMessageLite<
        DeleteResourceRequest, DeleteResourceRequest.Builder> implements
    // @@protoc_insertion_point(message_implements:im.turms.proto.DeleteResourceRequest)
    DeleteResourceRequestOrBuilder {
  private DeleteResourceRequest() {
    keyStr_ = "";
  }
  private int bitField0_;
  public static final int CONTENT_TYPE_FIELD_NUMBER = 1;
  private int contentType_;
  /**
   * <code>.im.turms.proto.ContentType content_type = 1;</code>
   * @return The enum numeric value on the wire for contentType.
   */
  @java.lang.Override
  public int getContentTypeValue() {
    return contentType_;
  }
  /**
   * <code>.im.turms.proto.ContentType content_type = 1;</code>
   * @return The contentType.
   */
  @java.lang.Override
  public im.turms.client.model.proto.constant.ContentType getContentType() {
    im.turms.client.model.proto.constant.ContentType result = im.turms.client.model.proto.constant.ContentType.forNumber(contentType_);
    return result == null ? im.turms.client.model.proto.constant.ContentType.UNRECOGNIZED : result;
  }
  /**
   * <code>.im.turms.proto.ContentType content_type = 1;</code>
   * @param value The enum numeric value on the wire for contentType to set.
   */
  private void setContentTypeValue(int value) {
      contentType_ = value;
  }
  /**
   * <code>.im.turms.proto.ContentType content_type = 1;</code>
   * @param value The contentType to set.
   */
  private void setContentType(im.turms.client.model.proto.constant.ContentType value) {
    contentType_ = value.getNumber();
    
  }
  /**
   * <code>.im.turms.proto.ContentType content_type = 1;</code>
   */
  private void clearContentType() {
    
    contentType_ = 0;
  }

  public static final int KEY_STR_FIELD_NUMBER = 2;
  private java.lang.String keyStr_;
  /**
   * <code>optional string key_str = 2;</code>
   * @return Whether the keyStr field is set.
   */
  @java.lang.Override
  public boolean hasKeyStr() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>optional string key_str = 2;</code>
   * @return The keyStr.
   */
  @java.lang.Override
  public java.lang.String getKeyStr() {
    return keyStr_;
  }
  /**
   * <code>optional string key_str = 2;</code>
   * @return The bytes for keyStr.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getKeyStrBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(keyStr_);
  }
  /**
   * <code>optional string key_str = 2;</code>
   * @param value The keyStr to set.
   */
  private void setKeyStr(
      java.lang.String value) {
    java.lang.Class<?> valueClass = value.getClass();
  bitField0_ |= 0x00000001;
    keyStr_ = value;
  }
  /**
   * <code>optional string key_str = 2;</code>
   */
  private void clearKeyStr() {
    bitField0_ = (bitField0_ & ~0x00000001);
    keyStr_ = getDefaultInstance().getKeyStr();
  }
  /**
   * <code>optional string key_str = 2;</code>
   * @param value The bytes for keyStr to set.
   */
  private void setKeyStrBytes(
      com.google.protobuf.ByteString value) {
    checkByteStringIsUtf8(value);
    keyStr_ = value.toStringUtf8();
    bitField0_ |= 0x00000001;
  }

  public static final int KEY_NUM_FIELD_NUMBER = 3;
  private long keyNum_;
  /**
   * <code>optional int64 key_num = 3;</code>
   * @return Whether the keyNum field is set.
   */
  @java.lang.Override
  public boolean hasKeyNum() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * <code>optional int64 key_num = 3;</code>
   * @return The keyNum.
   */
  @java.lang.Override
  public long getKeyNum() {
    return keyNum_;
  }
  /**
   * <code>optional int64 key_num = 3;</code>
   * @param value The keyNum to set.
   */
  private void setKeyNum(long value) {
    bitField0_ |= 0x00000002;
    keyNum_ = value;
  }
  /**
   * <code>optional int64 key_num = 3;</code>
   */
  private void clearKeyNum() {
    bitField0_ = (bitField0_ & ~0x00000002);
    keyNum_ = 0L;
  }

  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return (Builder) DEFAULT_INSTANCE.createBuilder();
  }
  public static Builder newBuilder(im.turms.client.model.proto.request.storage.DeleteResourceRequest prototype) {
    return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * Protobuf type {@code im.turms.proto.DeleteResourceRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        im.turms.client.model.proto.request.storage.DeleteResourceRequest, Builder> implements
      // @@protoc_insertion_point(builder_implements:im.turms.proto.DeleteResourceRequest)
      im.turms.client.model.proto.request.storage.DeleteResourceRequestOrBuilder {
    // Construct using im.turms.client.model.proto.request.storage.DeleteResourceRequest.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <code>.im.turms.proto.ContentType content_type = 1;</code>
     * @return The enum numeric value on the wire for contentType.
     */
    @java.lang.Override
    public int getContentTypeValue() {
      return instance.getContentTypeValue();
    }
    /**
     * <code>.im.turms.proto.ContentType content_type = 1;</code>
     * @param value The contentType to set.
     * @return This builder for chaining.
     */
    public Builder setContentTypeValue(int value) {
      copyOnWrite();
      instance.setContentTypeValue(value);
      return this;
    }
    /**
     * <code>.im.turms.proto.ContentType content_type = 1;</code>
     * @return The contentType.
     */
    @java.lang.Override
    public im.turms.client.model.proto.constant.ContentType getContentType() {
      return instance.getContentType();
    }
    /**
     * <code>.im.turms.proto.ContentType content_type = 1;</code>
     * @param value The enum numeric value on the wire for contentType to set.
     * @return This builder for chaining.
     */
    public Builder setContentType(im.turms.client.model.proto.constant.ContentType value) {
      copyOnWrite();
      instance.setContentType(value);
      return this;
    }
    /**
     * <code>.im.turms.proto.ContentType content_type = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearContentType() {
      copyOnWrite();
      instance.clearContentType();
      return this;
    }

    /**
     * <code>optional string key_str = 2;</code>
     * @return Whether the keyStr field is set.
     */
    @java.lang.Override
    public boolean hasKeyStr() {
      return instance.hasKeyStr();
    }
    /**
     * <code>optional string key_str = 2;</code>
     * @return The keyStr.
     */
    @java.lang.Override
    public java.lang.String getKeyStr() {
      return instance.getKeyStr();
    }
    /**
     * <code>optional string key_str = 2;</code>
     * @return The bytes for keyStr.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getKeyStrBytes() {
      return instance.getKeyStrBytes();
    }
    /**
     * <code>optional string key_str = 2;</code>
     * @param value The keyStr to set.
     * @return This builder for chaining.
     */
    public Builder setKeyStr(
        java.lang.String value) {
      copyOnWrite();
      instance.setKeyStr(value);
      return this;
    }
    /**
     * <code>optional string key_str = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearKeyStr() {
      copyOnWrite();
      instance.clearKeyStr();
      return this;
    }
    /**
     * <code>optional string key_str = 2;</code>
     * @param value The bytes for keyStr to set.
     * @return This builder for chaining.
     */
    public Builder setKeyStrBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setKeyStrBytes(value);
      return this;
    }

    /**
     * <code>optional int64 key_num = 3;</code>
     * @return Whether the keyNum field is set.
     */
    @java.lang.Override
    public boolean hasKeyNum() {
      return instance.hasKeyNum();
    }
    /**
     * <code>optional int64 key_num = 3;</code>
     * @return The keyNum.
     */
    @java.lang.Override
    public long getKeyNum() {
      return instance.getKeyNum();
    }
    /**
     * <code>optional int64 key_num = 3;</code>
     * @param value The keyNum to set.
     * @return This builder for chaining.
     */
    public Builder setKeyNum(long value) {
      copyOnWrite();
      instance.setKeyNum(value);
      return this;
    }
    /**
     * <code>optional int64 key_num = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearKeyNum() {
      copyOnWrite();
      instance.clearKeyNum();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:im.turms.proto.DeleteResourceRequest)
  }
  @java.lang.Override
  @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
  protected final java.lang.Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      java.lang.Object arg0, java.lang.Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new im.turms.client.model.proto.request.storage.DeleteResourceRequest();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "bitField0_",
            "contentType_",
            "keyStr_",
            "keyNum_",
          };
          java.lang.String info =
              "\u0000\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0000\u0001\f\u0002\u1208" +
              "\u0000\u0003\u1002\u0001";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser<im.turms.client.model.proto.request.storage.DeleteResourceRequest> parser = PARSER;
        if (parser == null) {
          synchronized (im.turms.client.model.proto.request.storage.DeleteResourceRequest.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser<im.turms.client.model.proto.request.storage.DeleteResourceRequest>(
                      DEFAULT_INSTANCE);
              PARSER = parser;
            }
          }
        }
        return parser;
    }
    case GET_MEMOIZED_IS_INITIALIZED: {
      return (byte) 1;
    }
    case SET_MEMOIZED_IS_INITIALIZED: {
      return null;
    }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:im.turms.proto.DeleteResourceRequest)
  private static final im.turms.client.model.proto.request.storage.DeleteResourceRequest DEFAULT_INSTANCE;
  static {
    DeleteResourceRequest defaultInstance = new DeleteResourceRequest();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      DeleteResourceRequest.class, defaultInstance);
  }

  public static im.turms.client.model.proto.request.storage.DeleteResourceRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static volatile com.google.protobuf.Parser<DeleteResourceRequest> PARSER;

  public static com.google.protobuf.Parser<DeleteResourceRequest> parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}

